//
//  UDImageLabelButton.m
//  ChangHongCar
//
//  Created by yangqingluo on 15/12/31.
//  Copyright © 2015年 yangqingluo. All rights reserved.
//

#import "UDImageLabelButton.h"

#define edge_scale 0.7

@implementation UDImageLabelButton

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    
    if (self) {
        self.upImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.width)];
        [self addSubview:self.upImageView];
        
        self.centerImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 30, 30)];
        self.centerImageView.center = self.upImageView.center;
        [self addSubview:self.centerImageView];
        
        self.downLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.upImageView.left, self.upImageView.bottom, self.upImageView.width, frame.size.height - self.upImageView.bottom)];
        self.downLabel.textColor = [UIColor blackColor];
        self.downLabel.font = [UIFont systemFontOfSize:12.0];
        self.downLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.downLabel];
    }
    
    return self;
}

@end
